﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.ywxt.ProjectJJ
{
    class map_ProjectJJSQ : EntityMapping<DB_Model.ywxt.ProjectJJ.ProjectJJSQ>
    {
        public map_ProjectJJSQ()
        {
            Property(x => x.SQTitle, map =>
            {
                map.Length(1000000);
            });

            //所属项目
            Bag(x => x.Projects, map =>
            {
                map.Table("ref_JJSQ_to_Projects");
                map.Key(keyMapper => keyMapper.Column("JJSQId"));
            }, act => act.ManyToMany(m => m.Column("ProjId")));


            //申请用户
            ManyToOne(x => x.SQUser, map =>
            {
                map.Column("UserID");
            });

            Property(x => x.sqContent, map =>
            {
                map.Length(100000);
            });

            Property(x => x.ApprovalRecordId, map =>
            {
                map.Length(40);
            });

            Property(x => x.sqEndDate, map =>
            {

            });

            Property(x => x.sqEndFlag, map =>
            {

            });

            Property(x => x.sqZSR, map =>
            {

            });

            Property(x => x.sqZZC, map =>
            {

            });

            Property(x => x.sqKZPSR, map =>
            {

            });

            Property(x => x.sqZLBZJ, map =>
            {

            });

            Property(x => x.sqXYFC, map =>
            {

            });

            Property(x => x.sqJJSF, map =>
            {

            });

            Property(x => x.ProcessDescribe, map =>
            {
                map.Length(100000);
            });
        }
    }
}
